/*
 * Copyright (c) 2023, 2023,yzc.cn All rights reserved.
 *
 */
package cn.yzc.config;

import cn.yzc.Interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * <p>Project: SpringBootPro - LoginInterceptorConfig</p>
 * <p>Powered by yzc On 2023-11-11 15:02:56</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@Configuration
public class LoginInterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api_V1.0/**").excludePathPatterns("/api_V1.0/user/login", "/api_V1.0/user/register");
        WebMvcConfigurer.super.addInterceptors(registry);
    }
}
